package com.collection;

import com.domin.Student;

import java.util.ArrayList;
import java.util.Collection;

public class CollectionTest1 {
    public static void main(String[] args) {
        Collection<Student> c=new ArrayList();

        c.add(new Student("张三",25));
        c.add(new Student("王五",45));

        c.clear(); // 清空

        c.remove(new Student("张三",25));

        c.isEmpty();

        c.contains(new Student("展望i",45)); // 判断是否存在

        c.size(); // 集合长度
    }
}
